
<style type="text/css">
  .RbacModal{
    height: 500px;
    overflow: scroll;
  }
  span.error{
      background:no-repeat;
      float:left;
      margin-left:3em;
        clear: both;
        color: red;
  }
</style>
<script type="text/javascript" src="{{ctx}}/static/bsl/js/spin.min.js"></script>
<!-- 增加角色窗口 -->
<div id="addRoleModal" class="modal fade" data-height="300" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<form id="addRoleForm" style="margin: 0" id="dataForm" name="dataForm" method="post" >
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">新增角色</h3>
    </div>

     
    <div class="modal-body" style=" overflow: scroll; height: 300px; ">
        <table class="table table-bordered">
          <tbody>
            <tr>
              <td width="30%"><span > *角色ID(必填)</span></td>
              <td><input type="text" class="form-control wid150px" id="input-rolename" name="rolename"></td>
            </tr>
            <tr>
              <td><span > *角色名(必填) </span></td>
              <td><input type="text" id="input-chinesename" name="name" class="form-control wid150px"></input></td>
            </tr>
            <input type="hidden" id="roleType" name="roleType" value="1"></input>
          </tbody>
        </table>
      
    </div>
    <div class="modal-footer">
      <input type="button" value="创建角色" class="btn btn-primary" aria-hidden="true" onclick="addRole()" />
      <button class="btn btn-common" data-dismiss="modal" aria-hidden="true">关闭</button>    
    </div>
  </form>  

</div>

<!-- 编辑角色窗口 -->
<div id="editRoleModal" class="modal fade" data-height="300" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
    <form id="editRoleForm" style="margin: 0" id="dataForm" name="dataForm" method="post" >
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">编辑角色</h3>
        </div>


        <div class="modal-body" style=" overflow: scroll; height: 300px; ">
            <table class="table table-bordered">
                <tbody>
                <tr>
                    <td width="30%"><span > *角色ID(必填)</span></td>
                    <td><input type="text" class="form-control wid150px" id="edit-input-rolename" name="rolename"></td>
                </tr>
                <tr>
                    <td><span > *角色名(必填) </span></td>
                    <td><input type="text" id="edit-input-chinesename" name="name" class="form-control wid150px"></input></td>
                </tr>
                <input type="hidden" id="edit-roleType" name="roleType" ></input>
                <input type="hidden" id="edit-roleId" name="id" ></input>
                </tbody>
            </table>

        </div>
        <div class="modal-footer">
            <input type="button" value="保存" class="btn btn-primary" aria-hidden="true" onclick="editRole()" />
            <button class="btn btn-common" data-dismiss="modal" aria-hidden="true">关闭</button>
        </div>
    </form>

</div>




<!-- 应用权限窗口 -->
<div id="setPrivilegeModal" class="modal fade " data-height="450" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  

  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">授权管理</h3>
  </div>
   
  <div id="privilageModal" class="modal-body" style=" overflow: scroll; height: 450px; ">

    

    <select class="inline-form-control" id="privilage-appSelecter" >

    </select> 

    

    <div class="tabbable tabs-left" >
              <!-- <ul class="nav nav-tabs" id="app-group">
               
              </ul> -->
              <!-- 用js填充面板内容 -->
              <!-- <div class="tab-content" id="app-content"> -->
              <div id="app-content">
                  <!-- 用js填充面板内容 -->
              </div>
      </div>
  
    


  </div>

  <div class="modal-footer">
    <!-- <input id="selectAllPrivilegeCheckbox" class="choice-w" type="checkbox" onchange="selectAll('selectAllPrivilegeCheckbox','appContent_5200ea7a8314036c9cc3ecb0')" > -->
    <button id="btn-privilege-selectAll" class="btn btn-primary" aria-hidden="true" >全选</button>
    <button id='btn-privilege-save' class="btn btn-primary" data-dismiss="modal" aria-hidden="true" >确定</button>
    <button class="btn btn-common" data-dismiss="modal" aria-hidden="true">关闭</button>    
  </div>
</div>



<!-- 角色管理中的用户管理 -->
<div id="setRoleUserModal" class="modal hide fade" data-backdrop="static" data-height="300" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">

  
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">用户设置</h3>
  </div>

   
  <div class="modal-body" style=" overflow: scroll; height: 300px; ">

       {{#userList}}
       <div>{{name}}</div></br>
       {{/userList}}
  </div>
</div>



<!-- 增加用户角色窗口 -->
<div id="addRoleUserModal" class="modal fade " tabindex="-1" data-height="300" data-backdrop="static" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<form  id = "addUserForm" style="margin: 0" id="dataForm" name="dataForm" method="post"
      action="addUserAndRoles">
<!-- <div class="modal-content"> -->
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">选择用户</h3>
  </div>

  
  <div class="modal-body" style=" overflow: scroll; height: 300px; ">
    
      <!-- <span> 角色名 </span>
      <input type="text" id="input-rolename" name="rolename"></input>
    </br>
      <span> 角色中文 </span>
      <input type="text" id="input-chinesename" name="name"></input>
    </br> -->
    <table id="addRoleUserTable" border="0" cellpadding="0" cellspacing="0" class="table table-bordered table-center">
        <thead>
          <tr>
            <td class="bd_txt2">
              <input id="addRoleUserCheckbox" class="choice-w" type="checkbox" onchange="selectAll('addRoleUserCheckbox','tbody-modal-userList')"></td>
            <td class="bd_txt2 bd_le">用户名</td>
            <td class="bd_txt2 bd_le">用户昵称</td>
          </tr>
        </thead>
        <tbody id="tbody-modal-userList">
                
        </tbody>
    </table>
  </div>
  <div class="modal-footer">

    <!-- 弹出窗口是，通过脚本动态设置 提交方法，方法名为：saveRoleUser(roleID) -->
    <input value="新增" type="button" class="btn btn-primary"  aria-hidden="true" id='btn-addRoleUser' />
    <button class="btn btn-common" data-dismiss="modal" aria-hidden="true">关闭</button>   
    <!-- </div>  -->
  </div>
  

</div>